{layout name="layout2" /}
<div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
    <input type="hidden" value="{$info.id}" name="id">
    <div class="layui-form-item">
        <label class="layui-form-label">账号</label>
        <div class="layui-input-inline">
            <input type="text" name="account" value="{$info.account}" lay-verify="required" placeholder="请输入账号" lay-vertype="tips" autocomplete="off" class="layui-input" >
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-inline">
            <input type="password" name="password"  placeholder="如需更改，请输入密码" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">确定密码</label>
        <div class="layui-input-inline">
            <input type="password" name="re_password" placeholder="确定请输入密码" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-inline">
            <input type="text" name="name" value="{$info.name}"  lay-verify="required" lay-vertype="tips" placeholder="请输入名称" autocomplete="off" class="layui-input">
        </div>
    </div>
   <!--   <option value="">选择</option>
                  {volist name="info['role_id']" id="va"}
                   {volist name="role_lists" id="vo"}
                <option value="{$vo.id}" {eq name="va" value="$vo.id"}selected{/eq} >{$vo.name}</option>
                {/volist}
                
                {/volist} -->
    <div class="layui-form-item">
        <label class="layui-form-label">角色</label>
        <div class="layui-input-inline">
            

            <select name="role_id" id = 'aa' xm-select="welfare" xm-select-search="" xm-select-search-type="dl" xm-select-skin="normal" >
                {volist name="role_lists" id="vo"}
                                           
                  <option value="{$vo.id}">{$vo.name}</option>                                                                                  
                {/volist} 
              
            </select>
           
        </div>
    </div>
        <div class="layui-form-item">
        <label class="layui-form-label">分公司</label>
        <div class="layui-input-inline">
            <select name="basis_id" lay-verify="required"lay-vertype="tips" placeholder="请选择角色" >
                {volist name="basis_lists.list" id="vo"}
                 {if condition="$info['basis_id'] == $vo.id"}
                <option value="{$vo.id}">{$vo.name}</option>
                {/if}
                {/volist}
               
               
            </select>
        </div>
    </div>
        <div class="layui-form-item">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-inline">
            <input type="text" name="mobile" value="{$info.mobile}" lay-verify="required" lay-vertype="tips" placeholder="请输入手机号" autocomplete="off" class="layui-input">
        </div>
    </div>
        <div class="layui-form-item">
        <label class="layui-form-label">地址</label>
        <div class="layui-input-inline">
            <input type="text" name="address"  value="{$info.address}"  lay-verify="required" lay-vertype="tips" placeholder="请输入地址" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
            {if condition="$info.root eq 0"}
            <input type="checkbox" lay-filter="disable" name="disable" lay-skin="switch" lay-text="启用|禁用" {if condition="$info.disable eq 0" }checked{/if}>
            {else/}
            <input type="checkbox" lay-filter="disable" name="disable" lay-skin="switch" lay-text="启用|禁用" disabled checked>
            {/if}
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="admin-submit-edit" id="admin-submit-edit" value="确认">
    </div>
</div>
<link rel="stylesheet" href="/static/plug/formSelects/formSelects-v4.css" />
<script src="/static/plug/formSelects/formSelects-v4.js" type="text/javascript" charset="utf-8"></script>
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<script>
    var value ={:json_encode($info.role_id)};
    layui.config({
        version:"{$front_version}",
        base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function(){
        var $ = layui.$
            ,form = layui.form ;
            
           
    })

  for (let a of value) {
         $('#aa').find("option[value="+a+"]").attr("selected",true);
        }

form.render('select') //再次渲染
</script>